package com.company.cloud.tenant.modules.api.service;

import com.company.cloud.common.bean.BaseClientResult;
import com.company.cloud.tenant.modules.api.request.*;
import com.company.cloud.tenant.modules.api.response.TenantFull;
import com.company.cloud.tenant.modules.api.response.TenantFullPage;
import com.company.cloud.tenant.modules.api.response.TenantSimple;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;
import java.util.Set;

/**
 * 租户服务
 * */
public interface TenantRemoteService {

    /**获取公司信息*/
    @RequestMapping(value = "/remote/tenant/getBySimpleId", method = RequestMethod.GET)
    public BaseClientResult<TenantSimple> getTenantSimple(@RequestParam("tenantCode") String tenantCode);

    /**获取公司信息*/
    @RequestMapping(value = "/remote/tenant/getBySimpleIds",method = RequestMethod.POST)
    public BaseClientResult<Map<String, TenantSimple>> getTenantMapSimple(@RequestBody Set<String> tenantCodes);

    /**获取公司信息*/
    @RequestMapping(value = "/remote/tenant/getFullById", method = RequestMethod.GET)
    public BaseClientResult<TenantFull> getTenantFull(@RequestParam("tenantCode") String tenantCode);

    /**获取公司信息*/
    @RequestMapping(value = "/remote/tenant/getFullByIds",method = RequestMethod.POST)
    public BaseClientResult<Map<String, TenantFull>> getTenantMapFull(@RequestBody Set<String> tenantCodes);

    /**查询公司信息*/
    @RequestMapping(value = "/remote/tenant/queryFull",method = RequestMethod.POST)
    public BaseClientResult<TenantFullPage> queryTenantFull(@RequestBody TenantQueryRequest request);


    /**新增公司信息*/
    @RequestMapping(value = "/remote/tenant/add",method = RequestMethod.POST)
    public  BaseClientResult<TenantFull> addTenant(@RequestBody TenantAddRequest request);

    /**新增公司信息*/
    @RequestMapping(value = "/remote/tenant/add2user",method = RequestMethod.POST)
    public  BaseClientResult<TenantFull> addTenant2User(@RequestBody Tenant2UserAddRequest request);

    /**修改公司信息*/
    @RequestMapping(value = "/remote/tenant/update",method = RequestMethod.POST)
    public  BaseClientResult<TenantFull> updateTenant(@RequestBody TenantUpdateRequest request);

    /**删除公司信息*/
    @RequestMapping(value = "/remote/tenant/del",method = RequestMethod.POST)
    public  BaseClientResult<TenantFull> delTenant(@RequestBody TenantDelRequest request);


    /**审核公司信息*/
    @RequestMapping(value = "/remote/tenant/check",method = RequestMethod.POST)
    public  BaseClientResult<TenantFull> checkTenant(@RequestBody TenantCheckRequest request);


    /**冻结公司信息*/
    @RequestMapping(value = "/remote/tenant/frozen",method = RequestMethod.POST)
    public  BaseClientResult<TenantFull> frozenTenant(@RequestBody TenantFrozenRequest request);

    /**解冻公司信息*/
    @RequestMapping(value = "/remote/tenant/unfreeze",method = RequestMethod.POST)
    public  BaseClientResult<TenantFull> unfreezeTenant(@RequestBody TenantUnFreezeRequest request);


}
